package com.cuiyun97.context;

/**
 * 处理共享变量
 * 比如登录人id
 */
public class BaseContext {

    public static ThreadLocal<Integer> threadLocal = new ThreadLocal<>();

    public static void setAdminId(Integer id) {
        threadLocal.set(id);
    }

    public static Integer getAdminId() {
        return threadLocal.get();
    }

    public static void removeAdminId() {
        threadLocal.remove();
    }

}
